<template>
	<h3>动态路由传参</h3>
	{{$route.params.id}}
</template>

<script setup>
import { onMounted } from 'vue';
import { useRoute } from 'vue-router';

	let route=useRoute()
	onMounted(()=>{
		let id=route.params.id
		alert(id)
	})
</script>

<style>
</style>